window.onload=function(){
	heard();
	}


function heard(){
	console.log(11111);
		var orderId = sessionStorage.getItem("orderId");
		$.ajax({
		    type:"POST",
		    url:"http://www.youyiku-yishu.cn/WebApp/AppOrders/sureOrder",
		    data:{orderId:orderId},
		    dataType:"json",
		       beforeSend: function (XMLHttpRequest) {
		         		XMLHttpRequest.setRequestHeader("DEVICEINFO", "JxRaZezavm3HXM3d9pWnYiqqQC1SJbsU");
		       }
		  }).then(data=>{
		  	console.log(data);
		  	var bookType=data.bookType;
		  	var goodsNums=data.goodsNums;
		  	var pagel=data.page;
		  	var papersize=data.papersize;
		  	var bookbinding=data.bookbinding;
		  	var realTotalMoney=data.realTotalMoney;
		  	var orderNo=data.orderNo;
		  	var createTime=data.createTime;
		  	var userName=data.userName;
		  	var userPhone=data.userPhone;
		  	var province=data.province;
		  	var city=data.city;
		  	var region=data.region;
		  	var userAddress=data.userAddress;
			page='';
			page+='<div class="main_top">';
			page+='<div class="name">';
				 if(bookType==1){
				 	page+='<a>微信忆书</a>';
				 }else if(bookType==2){
				 	page+='<a>空间相册书</a>';
				 }else if(bookType==3){
				 	page+='<a>微博忆书</a>';
				 }else{
				 	page+='<a>照片书·忆书</a>';
				 }				
			page+='</div>';
			page+='<div class="paiban">';
			page+='<div class="paiban_img left">';
			page+='<img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Group 7 Copy 2.png" class="img">';
			page+='</div>';
			page+='<div class="paiban_input left">'
			page+='<span class="bold">数量:</span>';
			page+='<input  type="" name="" value="'+goodsNums+'" class="number_input">';
			page+='<span>本</span>';
			page+='</div>';
			page+='</div>';
			page+='<div class="paiban padding_top">';
			page+='<div class="paiban_img left">';
			page+='<img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Rectangle 2.png" class="img">';
			page+='</div>';
			page+='<div class="paiban_input left">';
			page+='<span class="bold">页数:</span>';
		    page+='<input  type="" name="" value="'+pagel+'" class="number_input">';
			page+='<span>页</span>';
			page+='</div>';
			page+='</div>';
			page+='<div class="paiban padding_top">';
			page+='<div class="paiban_img left">';
			page+='<img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Rectangle 5.png" class="img">';
			page+='</div>';
			page+='<div class="paiban_input left">';
			page+='<span class="bold">印刷：</span>';
			page+='<span class="span_color">标配用惠普indigo数码六色超高清印刷</span>';
			page+='</div>';
			page+='</div>';
			page+='<div class="paiban padding_top">';
			page+='<div class="paiban_img left">';
			page+='<img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Rectangle 36.png" class="img">';
			page+='</div>';
			page+='<div class="paiban_input left">';
			page+='<span class="bold">尺寸纸张类别：</span>';
			page+='<span class="span_color">'+papersize+'</span>';
			page+='</div>';
			page+='</div>';
			page+='<div class="paiban padding_top">';
			page+='<div class="paiban_img left">';
			page+='<img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Group 6.png" class="img">';
			page+='</div>';
			page+='<div class="paiban_input left">';
			page+='<span class="bold">装帧：</span>';
			page+='<span class="span_color">'+bookbinding+'</span>';
			page+='</div>';
			page+='</div>';
			page+='<div class="paiban padding_top">';
			page+='<div class="paiban_img left">';
			page+='<img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Rectangle 3.png" class="img">';
			page+='</div>';
			page+='<div class="paiban_input left">';
			page+='<span class="bold">价格：</span>';
			page+='<span class="span_color">'+realTotalMoney+'</span>';
			page+='</div>';
			page+='</div>';
			page+='</div>';
		    page+='<div class="main_top top">';
		    page+='<div class="paiban padding_top padding">';
			page+='<div class="paiban_img left">';
			page+='<img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Rectangle 6 Copy.png" class="img">';
			page+='</div>';
			page+='<div class="paiban_input left">';
			page+='<span class="bold">订单编号：</span>';
			page+='<span class="span_color">'+orderNo+'</span>';
			page+'=</div>';
			page+='</div>';
			page+='<div class="paiban padding_top">';
			page+='<div class="paiban_img left">';
			page+='<img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/time.png" class="img">';
			page+='</div>';
			page+='<div class="paiban_input left">';
			page+='<span class="bold">订单创建时间：</span>';
			page+='<span class="span_color">'+createTime+'</span>';
			page+='</div>';
			page+='</div>';
			page+='<div class="paiban padding_top">';
			page+'=<div class="paiban_img left">';
			page+='<img src="http://www.youyiku-yishu.cn/Apps/WebApp/View/default/images/Rectangle 24 Copy.png" class="img">';
			page+='</div>';
			page+='<div class="paiban_input left">';
			page+='<span class="bold">收件地址及信息：</span>';
			page+='<span class="span_color height">'+userName+';'+userPhone+';<br>'+province+''+city+''+region+''+userAddress+';</span>'
			page+='</div>';
			page+='</div>';
			page+='</div>';
			$('.main').html(page);
    })
}
